project(main)




set(CMAKE_CXX_STANDARD 11)

file(GLOB_RECURSE Files *.cpp *.h)

add_executable(${PROJECT_NAME} ${Files})



#包含头文件目录
#include_directories(${PROJECT_SOURCE_DIR}/../mpp_itc_dec_interface)
#include_directories(${PROJECT_SOURCE_DIR}/../mpp_itc_enc_interface)
include_directories(${PROJECT_SOURCE_DIR}/../common)
include_directories(${PROJECT_SOURCE_DIR}/../common/rockchip/include)
include_directories(${PROJECT_SOURCE_DIR}/../common/rockchip/include/libdrm)
include_directories(${PROJECT_SOURCE_DIR}/../common/rockchip/rga)

#添加rockit头文件路径
include_directories(${PROJECT_SOURCE_DIR}/../common/rockchip/rockit/sdk/include)
#包含动态链接库



#需要连接到瑞星微MPP的SO环境
target_link_libraries(${PROJECT_NAME} /usr/local/lib/librockchip_mpp.so)
target_link_libraries(${PROJECT_NAME} /usr/local/lib/librockchip_vpu.so)
target_link_libraries(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/../libs/librga.so)


target_link_libraries(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/../libs/libutils.a)
target_link_libraries(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/../libs/libosal.a)

#target_link_libraries(${PROJECT_NAME}
#    ${PROJECT_SOURCE_DIR}/../libs/libmpp_itc_display_interface.so)


#target_link_libraries(${PROJECT_NAME}
#    ${PROJECT_SOURCE_DIR}/../libs/libmpp_itc_enc_interface.so)
#target_link_libraries(${PROJECT_NAME}
#    ${PROJECT_SOURCE_DIR}/../libs/libmpp_itc_dec_interface.so)
target_link_libraries(${PROJECT_NAME}
                ${PROJECT_SOURCE_DIR}/../libs/libdrm.so)

#添加rockit路径

target_link_libraries(${PROJECT_NAME}
                ${PROJECT_SOURCE_DIR}/../common/rockchip/rockit/sdk/lib64/libavcodec.so.58)
target_link_libraries(${PROJECT_NAME}
                ${PROJECT_SOURCE_DIR}/../common/rockchip/rockit/sdk/lib64/libavformat.so.58)
target_link_libraries(${PROJECT_NAME}
                ${PROJECT_SOURCE_DIR}/../common/rockchip/rockit/sdk/lib64/libavutil.so.56)
target_link_libraries(${PROJECT_NAME}
                ${PROJECT_SOURCE_DIR}/../common/rockchip/rockit/sdk/lib64/librockit.so)
target_link_libraries(${PROJECT_NAME}
                ${PROJECT_SOURCE_DIR}/../common/rockchip/rockit/sdk/lib64/libswresample.so.3)



#需要包含的公共库
target_link_libraries(${PROJECT_NAME} pthread)
target_link_libraries(${PROJECT_NAME} dl)